import { globalMiddleware } from "./src/middleware";

import Koa from "koa";
import koaBody from "koa-body";
import adminRouter from "./src/api/admin";

const app = new Koa();

app.use(globalMiddleware).use(koaBody()).use(adminRouter.routes());

const PORT = 3000;
app.listen(PORT, () => {
    console.log(`Server running at http://localhost:${PORT}`);
});
